<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<select name="section" id="s1">
		<option value="1">骨科</option>
		<option value="2">急诊科</option>
		<option value="3">妇科</option>
	</select>
	<select name="doctor" id="s2"></select>
</body>
<script type="text/javascript" src="Js/jquery-1.11.0.js"></script>
<script type="text/javascript">
	$("#s1").change(function(){
		var val = $("#s1").val();
		$.ajax({
			url:"twoLevel",
			data:{"val":val},
			type:"get",
			success:function(qqq){
				$("#s2").empty();
				for(var i=0;i<qqq.obj.length;i++){
					$("#s2").append("<option>"+qqq.obj[i].doctor_name+"</option>");
				}
			},
			error:function(){
				alert("科室已解散")
			}
		});
	});
</script>
</html>